//获取页面实际大小
var topDocument = document;
function getPageSize(){
    var xScroll, yScroll;
    if (window.innerHeight && window.scrollMaxY) {
        xScroll = topDocument.body.scrollWidth;
        yScroll = window.innerHeight + window.scrollMaxY;
    } else if (topDocument.body.scrollHeight > topDocument.body.offsetHeight){ // all but Explorer Mac
        xScroll = topDocument.body.scrollWidth;
        yScroll = topDocument.body.scrollHeight;
    } else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
        xScroll = topDocument.body.offsetWidth;
        yScroll = topDocument.body.offsetHeight;
    }
    var windowWidth, windowHeight;
    if (self.innerHeight) {    // all except Explorer
        windowWidth = self.innerWidth;
        windowHeight = self.innerHeight;
    } else if (topDocument.documentElement && topDocument.documentElement.clientHeight) { // Explorer 6 Strict Mode
        windowWidth = topDocument.documentElement.clientWidth;
        windowHeight = topDocument.documentElement.clientHeight;
    } else if (topDocument.body) { // other Explorers
        windowWidth = topDocument.body.clientWidth;
        windowHeight = topDocument.body.clientHeight;
    }
    // for small pages with total height less then height of the viewport
    var pageHeight, pageWidth;
    if(yScroll < windowHeight){
        pageHeight = windowHeight;
    } else {
        pageHeight = yScroll;
    }
    // for small pages with total width less then width of the viewport
    if(xScroll < windowWidth){
        pageWidth = windowWidth;
    } else {
        pageWidth = xScroll;
    }
    var arrayPageSize = new Array(pageWidth, pageHeight, windowWidth, windowHeight);
    return arrayPageSize;
}

function animateFun(obj,newHeight,timeSet){
	var time = 500 || timeSet;
	$(obj).animate({
        height:newHeight
    },time,function(){
		
	});
}